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

Side by Side Diff: chrome/browser/notifications/notification_browsertest.cc

Issue 10778044: Always enable dom automation for browser_tests. This avoids developers having to call EnableDOMAuto… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 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 "chrome/browser/infobars/infobar_tab_helper.h" 5 #include "chrome/browser/infobars/infobar_tab_helper.h"
6 #include "chrome/browser/ui/browser.h" 6 #include "chrome/browser/ui/browser.h"
7 #include "chrome/browser/ui/browser_tabstrip.h" 7 #include "chrome/browser/ui/browser_tabstrip.h"
8 #include "chrome/browser/ui/tab_contents/tab_contents.h" 8 #include "chrome/browser/ui/tab_contents/tab_contents.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 #include "net/base/net_util.h" 12 #include "net/base/net_util.h"
13 #include "net/test/test_server.h" 13 #include "net/test/test_server.h"
14 14
15 class NotificationsPermissionTest : public InProcessBrowserTest { 15 class NotificationsPermissionTest : public InProcessBrowserTest {
16 public: 16 public:
17 NotificationsPermissionTest() { 17 NotificationsPermissionTest() {}
18 EnableDOMAutomation();
19 }
20 }; 18 };
21 19
22 // If this flakes, use http://crbug.com/62311 and http://crbug.com/74428. 20 // If this flakes, use http://crbug.com/62311 and http://crbug.com/74428.
23 IN_PROC_BROWSER_TEST_F(NotificationsPermissionTest, TestUserGestureInfobar) { 21 IN_PROC_BROWSER_TEST_F(NotificationsPermissionTest, TestUserGestureInfobar) {
24 ASSERT_TRUE(test_server()->Start()); 22 ASSERT_TRUE(test_server()->Start());
25 23
26 ui_test_utils::NavigateToURL( 24 ui_test_utils::NavigateToURL(
27 browser(), 25 browser(),
28 test_server()->GetURL( 26 test_server()->GetURL(
29 "files/notifications/notifications_request_function.html")); 27 "files/notifications/notifications_request_function.html"));
(...skipping 19 matching lines...) Expand all
49 // Load a page which just does a request; no user gesture should result 47 // Load a page which just does a request; no user gesture should result
50 // in no infobar. 48 // in no infobar.
51 ui_test_utils::NavigateToURL( 49 ui_test_utils::NavigateToURL(
52 browser(), 50 browser(),
53 test_server()->GetURL( 51 test_server()->GetURL(
54 "files/notifications/notifications_request_inline.html")); 52 "files/notifications/notifications_request_inline.html"));
55 53
56 EXPECT_EQ(0U, chrome::GetTabContentsAt(browser(), 0)->infobar_tab_helper()-> 54 EXPECT_EQ(0U, chrome::GetTabContentsAt(browser(), 0)->infobar_tab_helper()->
57 infobar_count()); 55 infobar_count());
58 } 56 }
OLDNEW
« no previous file with comments | « chrome/browser/net/load_timing_observer_browsertest.cc ('k') | chrome/browser/page_cycler/page_cycler_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698