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

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

Issue 9706012: Add abstractions that let embedders drive tests of WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove CONTENT_EXPORT on statically linked functions. Merge to head for commit. Created 8 years, 9 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) 2011 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 // Tests common functionality used by the Chrome Extensions webNavigation API 5 // Tests common functionality used by the Chrome Extensions webNavigation API
6 // implementation. 6 // implementation.
7 7
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/extension_webnavigation_api.h" 9 #include "chrome/browser/extensions/extension_webnavigation_api.h"
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 10 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
11 #include "chrome/test/base/testing_profile.h" 11 #include "chrome/test/base/testing_profile.h"
12 #include "content/browser/tab_contents/test_tab_contents.h"
13 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
14 13
15 14
16 class FrameNavigationStateTest : public ChromeRenderViewHostTestHarness { 15 class FrameNavigationStateTest : public ChromeRenderViewHostTestHarness {
17 }; 16 };
18 17
19 // Test that a frame is correctly tracked, and removed once the tab contents 18 // Test that a frame is correctly tracked, and removed once the tab contents
20 // goes away. 19 // goes away.
21 TEST_F(FrameNavigationStateTest, TrackFrame) { 20 TEST_F(FrameNavigationStateTest, TrackFrame) {
22 FrameNavigationState navigation_state; 21 FrameNavigationState navigation_state;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 104
106 // Tests that no events are send for a not web-safe scheme. 105 // Tests that no events are send for a not web-safe scheme.
107 TEST_F(FrameNavigationStateTest, WebSafeScheme) { 106 TEST_F(FrameNavigationStateTest, WebSafeScheme) {
108 FrameNavigationState navigation_state; 107 FrameNavigationState navigation_state;
109 const int64 frame_id = 23; 108 const int64 frame_id = 23;
110 const GURL url("unsafe://www.google.com/"); 109 const GURL url("unsafe://www.google.com/");
111 110
112 navigation_state.TrackFrame(frame_id, url, true, false); 111 navigation_state.TrackFrame(frame_id, url, true, false);
113 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id)); 112 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id));
114 } 113 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tab_util.h ('k') | chrome/browser/external_tab_container_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698