blob: 6e0821406a5590fc885b1f189d8187b817994ebb [file] [log] [blame]
// 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/public/mojom/base/file_path.mojom";
import "skia/public/mojom/bitmap.mojom";
import "ui/gfx/geometry/mojom/geometry.mojom";
import "url/mojom/url.mojom";
struct ShellTestConfiguration {
// The current working directory.
mojo_base.mojom.FilePath current_working_directory;
// The temporary directory of the system.
mojo_base.mojom.FilePath temp_path;
// The URL of the current web test.
url.mojom.Url test_url;
// 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;
// Whether the test is running in protocol mode.
// See TestInfo::protocol_mode in browser/web_test/test_info_extractor.h.
bool protocol_mode;
};
// Results of a CaptureDump call.
struct WebTestDump {
// Audio dump.
array<uint8>? audio;
// Layout dump.
string? layout;
// Image dump.
skia.mojom.Bitmap? pixels;
string actual_pixel_hash;
// Selection rect dump.
gfx.mojom.Rect selection_rect;
};
interface WebTestControl {
CaptureDump() => (WebTestDump result);
CompositeWithRaster() => ();
// Dumps the frame's contents into a string.
DumpFrameLayout() => (string frame_layout_dump);
// 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 web 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 web test.
SetupSecondaryRenderer();
};