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

Side by Side Diff: chrome/browser/extensions/web_view_browsertest.cc

Issue 11093080: <webview>: First stab at implementing media permission request for guests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add todo for auto deny when no listeners attached. Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/automation/automation_util.h" 6 #include "chrome/browser/automation/automation_util.h"
7 #include "chrome/browser/extensions/platform_app_browsertest_util.h" 7 #include "chrome/browser/extensions/platform_app_browsertest_util.h"
8 #include "chrome/browser/ui/browser_tabstrip.h" 8 #include "chrome/browser/ui/browser_tabstrip.h"
9 #include "chrome/test/base/test_launcher_utils.h"
9 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
10 #include "chrome/test/base/test_launcher_utils.h"
11 #include "content/public/browser/notification_service.h" 11 #include "content/public/browser/notification_service.h"
12 #include "content/public/browser/render_process_host.h" 12 #include "content/public/browser/render_process_host.h"
13 #include "content/public/test/browser_test_utils.h" 13 #include "content/public/test/browser_test_utils.h"
14 #include "ui/compositor/compositor_setup.h" 14 #include "ui/compositor/compositor_setup.h"
15 #include "ui/gl/gl_switches.h" 15 #include "ui/gl/gl_switches.h"
16 16
17 class WebViewTest : public extensions::PlatformAppBrowserTest { 17 class WebViewTest : public extensions::PlatformAppBrowserTest {
18 protected: 18 protected:
19 virtual void SetUpCommandLine(CommandLine* command_line) { 19 virtual void SetUpCommandLine(CommandLine* command_line) {
20 extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line); 20 extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line);
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 "indexedDB.open('isolation').onsuccess = function(e) {" 601 "indexedDB.open('isolation').onsuccess = function(e) {"
602 " if (e.target.result.version == 1)" 602 " if (e.target.result.version == 1)"
603 " document.title = 'db not found';" 603 " document.title = 'db not found';"
604 " else " 604 " else "
605 " document.title = 'error';" 605 " document.title = 'error';"
606 "}"; 606 "}";
607 ExecuteScriptWaitForTitle(chrome::GetWebContentsAt(browser(), 0), 607 ExecuteScriptWaitForTitle(chrome::GetWebContentsAt(browser(), 0),
608 script, "db not found"); 608 script, "db not found");
609 ExecuteScriptWaitForTitle(default_tag_contents1, script, "db not found"); 609 ExecuteScriptWaitForTitle(default_tag_contents1, script, "db not found");
610 } 610 }
611
612 IN_PROC_BROWSER_TEST_F(WebViewTest, MediaAccessApi) {
613 ASSERT_TRUE(StartTestServer()); // For serving guest pages.
614 ASSERT_TRUE(RunPlatformAppTest(
615 "platform_apps/web_view_media_access/embedder_has_permission"))
616 << message_;
617 ASSERT_TRUE(RunPlatformAppTest(
618 "platform_apps/web_view_media_access/embedder_has_no_permission"))
619 << message_;
620 }
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_renderer.gypi » ('j') | chrome/common/extensions/permissions/api_permission.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698