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

Side by Side Diff: content/browser/device_orientation/device_orientation_browsertest.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_tabstrip.h"
9 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
10 #include "chrome/test/base/ui_test_utils.h" 11 #include "chrome/test/base/ui_test_utils.h"
11 #include "content/browser/device_orientation/orientation.h" 12 #include "content/browser/device_orientation/orientation.h"
12 #include "content/browser/device_orientation/provider.h" 13 #include "content/browser/device_orientation/provider.h"
13 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
14 #include "content/public/common/content_switches.h" 15 #include "content/public/common/content_switches.h"
15 16
16 namespace device_orientation { 17 namespace device_orientation {
17 18
18 class MockProvider : public Provider { 19 class MockProvider : public Provider {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // The test page will register an event handler for orientation events, 61 // The test page will register an event handler for orientation events,
61 // expects to get an event with kTestOrientation orientation, 62 // expects to get an event with kTestOrientation orientation,
62 // then removes the event handler and navigates to #pass. 63 // then removes the event handler and navigates to #pass.
63 GURL test_url = testUrl(FILE_PATH_LITERAL("device_orientation_test.html")); 64 GURL test_url = testUrl(FILE_PATH_LITERAL("device_orientation_test.html"));
64 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(browser(), 65 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(browser(),
65 test_url, 66 test_url,
66 2); 67 2);
67 68
68 // Check that the page got the event it expected and that the provider 69 // Check that the page got the event it expected and that the provider
69 // saw requests for adding and removing an observer. 70 // saw requests for adding and removing an observer.
70 EXPECT_EQ("pass", browser()->GetActiveWebContents()->GetURL().ref()); 71 EXPECT_EQ("pass", chrome::GetActiveWebContents(browser())->GetURL().ref());
71 EXPECT_TRUE(provider->added_observer_); 72 EXPECT_TRUE(provider->added_observer_);
72 EXPECT_TRUE(provider->removed_observer_); 73 EXPECT_TRUE(provider->removed_observer_);
73 } 74 }
74 75
75 } // namespace device_orientation 76 } // namespace device_orientation
OLDNEW
« no previous file with comments | « content/browser/child_process_security_policy_browsertest.cc ('k') | content/browser/dom_storage/dom_storage_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698