summaryrefslogtreecommitdiff
path: root/chromium/content/shell/common/layout_test.mojom
blob: dd61553f4ecc53ef400cb7fb93457871bbca441e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module content.mojom;

import "mojo/common/file_path.mojom";
import "ui/gfx/geometry/mojo/geometry.mojom";
import "url/mojo/url.mojom";

struct ShellTestConfiguration {
  // The current working directory.
  mojo.common.mojom.FilePath current_working_directory;

  // The temporary directory of the system.
  mojo.common.mojom.FilePath temp_path;

  // The build directory.
  mojo.common.mojom.FilePath build_directory;

  // The URL of the current layout test.
  url.mojom.Url test_url;

  // True if pixel tests are enabled.
  bool enable_pixel_dumping = true;

  // True if tests can open external URLs
  bool allow_external_pages;

  // The expected MD5 hash of the pixel results.
  string expected_pixel_hash;

  // The initial size of the test window.
  gfx.mojom.Size initial_size;
};

interface LayoutTestControl {
  // Asks a frame to dump its contents into a string and send them back over
  // IPC.
  LayoutDumpRequest();

  // Replicates test config (for an already started test) to a new renderer
  // that hosts parts of the main test window.
  ReplicateTestConfiguration(ShellTestConfiguration config);

  // Sets the test config for a layout test that is being started.  This message
  // is sent only to a renderer that hosts parts of the main test window.
  SetTestConfiguration(ShellTestConfiguration config);

  // Sets up a secondary renderer (renderer that doesn't [yet] host parts of the
  // main test window) for a layout test.
  SetupSecondaryRenderer();
};