Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: content/test/webrtc_content_browsertest_base.h

Issue 2197143002: Revert of ImageCapture: content_browsertest WebRtcImageCaptureBrowserTest CreateAndGetCapabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/data/media/image_capture_test.html ('k') | content/test/webrtc_content_browsertest_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/webrtc_content_browsertest_base.h
diff --git a/content/test/webrtc_content_browsertest_base.h b/content/test/webrtc_content_browsertest_base.h
new file mode 100644
index 0000000000000000000000000000000000000000..09ca3c6eaa1f27c32c0100373b930e1926ed5798
--- /dev/null
+++ b/content/test/webrtc_content_browsertest_base.h
@@ -0,0 +1,47 @@
+// Copyright 2014 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.
+
+#include "content/public/test/content_browser_test.h"
+
+namespace base {
+class CommandLine;
+}
+
+namespace content {
+
+// Contains stuff WebRTC browsertests have in common.
+class WebRtcContentBrowserTest: public ContentBrowserTest {
+ public:
+ void SetUpCommandLine(base::CommandLine* command_line) override;
+ void SetUp() override;
+ void TearDown() override;
+
+ protected:
+ // Helper function to append "--use-fake-ui-for-media-stream".
+ void AppendUseFakeUIForMediaStreamFlag();
+
+ // Executes |javascript|. The script is required to use
+ // window.domAutomationController.send to send a string value back to here.
+ std::string ExecuteJavascriptAndReturnResult(
+ const std::string& javascript);
+
+ // Waits for the javascript to return OK via the automation controller.
+ // If the javascript returns != OK or times out, we fail the test.
+ void ExecuteJavascriptAndWaitForOk(const std::string& javascript);
+
+ // Execute a typical javascript call after having started the webserver.
+ void MakeTypicalCall(const std::string& javascript,
+ const std::string& html_file);
+
+ // Generates javascript code for a getUserMedia call.
+ std::string GenerateGetUserMediaCall(const char* function_name,
+ int min_width,
+ int max_width,
+ int min_height,
+ int max_height,
+ int min_frame_rate,
+ int max_frame_rate) const;
+};
+
+} // namespace content
« no previous file with comments | « content/test/data/media/image_capture_test.html ('k') | content/test/webrtc_content_browsertest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698