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

Unified Diff: content/browser/media/session/media_session_service_impl_browsertest.cc

Issue 2711293003: Media Session: add test for crash with command send on iframe during unload. (Closed)
Patch Set: add comment Created 3 years, 10 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 | « no previous file | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/session/media_session_service_impl_browsertest.cc
diff --git a/content/browser/media/session/media_session_service_impl_browsertest.cc b/content/browser/media/session/media_session_service_impl_browsertest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..959bbaeff65482c07fe91745e11c8cafe30dca78
--- /dev/null
+++ b/content/browser/media/session/media_session_service_impl_browsertest.cc
@@ -0,0 +1,29 @@
+// 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.
+
+#include "base/command_line.h"
+#include "content/public/test/content_browser_test.h"
+#include "content/public/test/content_browser_test_utils.h"
+#include "content/shell/browser/shell.h"
+
+namespace content {
+
+class MediaSessionServiceImplBrowserTest : public ContentBrowserTest {
+ protected:
+ void SetUpCommandLine(base::CommandLine* command_line) override {
+ ContentBrowserTest::SetUpCommandLine(command_line);
+ command_line->AppendSwitchASCII("--enable-blink-features", "MediaSession");
+ }
+};
+
+// Two windows from the same BrowserContext.
+IN_PROC_BROWSER_TEST_F(MediaSessionServiceImplBrowserTest,
+ CrashMessageOnUnload) {
+ NavigateToURL(shell(), GetTestUrl("media/session", "embedder.html"));
+ // Navigate to a chrome:// URL to avoid render process re-use.
+ NavigateToURL(shell(), GURL("chrome://flags"));
+ // Should not crash.
+}
+
+} // namespace content
« no previous file with comments | « no previous file | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698