OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/transition_request_manager.h" | 6 #include "content/browser/transition_request_manager.h" |
7 #include "content/public/common/content_switches.h" | 7 #include "content/public/common/content_switches.h" |
8 #include "content/public/test/test_browser_thread_bundle.h" | 8 #include "content/public/test/test_browser_thread_bundle.h" |
9 #include "net/http/http_response_headers.h" | 9 #include "net/http/http_response_headers.h" |
10 #include "net/http/http_util.h" | 10 #include "net/http/http_util.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class TransitionRequestManagerTest : public testing::Test { | 15 class TransitionRequestManagerTest : public testing::Test { |
16 public: | 16 public: |
17 TransitionRequestManagerTest() | 17 TransitionRequestManagerTest() |
18 : thread_bundle_(TestBrowserThreadBundle::IO_MAINLOOP) { | 18 : thread_bundle_(TestBrowserThreadBundle::IO_MAINLOOP) { |
19 CommandLine::ForCurrentProcess()->AppendSwitch( | 19 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
20 switches::kEnableExperimentalWebPlatformFeatures); | 20 switches::kEnableExperimentalWebPlatformFeatures); |
21 } | 21 } |
22 | 22 |
23 ~TransitionRequestManagerTest() override {} | 23 ~TransitionRequestManagerTest() override {} |
24 TestBrowserThreadBundle thread_bundle_; | 24 TestBrowserThreadBundle thread_bundle_; |
25 }; | 25 }; |
26 | 26 |
27 TEST_F(TransitionRequestManagerTest, | 27 TEST_F(TransitionRequestManagerTest, |
28 ParseTransitionStylesheetsFromNullHeaders) { | 28 ParseTransitionStylesheetsFromNullHeaders) { |
29 const GURL url("http://www.test.com/"); | 29 const GURL url("http://www.test.com/"); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 // 6. Check that a navigation to http://wwww.unrelated.com now finds an entry. | 164 // 6. Check that a navigation to http://wwww.unrelated.com now finds an entry. |
165 found = request_manager->GetPendingTransitionRequest( | 165 found = request_manager->GetPendingTransitionRequest( |
166 render_process_id, render_frame_id, unrelated_dot_com_url, | 166 render_process_id, render_frame_id, unrelated_dot_com_url, |
167 &transition_layer_data); | 167 &transition_layer_data); |
168 ASSERT_TRUE(found); | 168 ASSERT_TRUE(found); |
169 EXPECT_TRUE(transition_layer_data.css_selector == fallback_css_selector); | 169 EXPECT_TRUE(transition_layer_data.css_selector == fallback_css_selector); |
170 } | 170 } |
171 | 171 |
172 } // namespace content | 172 } // namespace content |
OLD | NEW |