| 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 "content/browser/transition_request_manager.h" | 5 #include "content/browser/transition_request_manager.h" |
| 6 #include "net/http/http_response_headers.h" | 6 #include "net/http/http_response_headers.h" |
| 7 #include "net/http/http_util.h" | 7 #include "net/http/http_util.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 class TransitionRequestManagerTest : public testing::Test { | 12 class TransitionRequestManagerTest : public testing::Test { |
| 13 public: | 13 public: |
| 14 virtual ~TransitionRequestManagerTest() {} | 14 ~TransitionRequestManagerTest() override {} |
| 15 }; | 15 }; |
| 16 | 16 |
| 17 TEST_F(TransitionRequestManagerTest, | 17 TEST_F(TransitionRequestManagerTest, |
| 18 ParseTransitionStylesheetsFromNullHeaders) { | 18 ParseTransitionStylesheetsFromNullHeaders) { |
| 19 const GURL url("http://www.test.com/"); | 19 const GURL url("http://www.test.com/"); |
| 20 std::vector<GURL> entering_stylesheets; | 20 std::vector<GURL> entering_stylesheets; |
| 21 scoped_refptr<net::HttpResponseHeaders> headers; | 21 scoped_refptr<net::HttpResponseHeaders> headers; |
| 22 | 22 |
| 23 TransitionRequestManager::ParseTransitionStylesheetsFromHeaders( | 23 TransitionRequestManager::ParseTransitionStylesheetsFromHeaders( |
| 24 headers, entering_stylesheets, url); | 24 headers, entering_stylesheets, url); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 ASSERT_TRUE(entering_stylesheets.size() == 3); | 97 ASSERT_TRUE(entering_stylesheets.size() == 3); |
| 98 ASSERT_STREQ((url.spec() + "transition0.css").c_str(), | 98 ASSERT_STREQ((url.spec() + "transition0.css").c_str(), |
| 99 entering_stylesheets[0].spec().c_str()); | 99 entering_stylesheets[0].spec().c_str()); |
| 100 ASSERT_STREQ((url.spec() + "transition1.css").c_str(), | 100 ASSERT_STREQ((url.spec() + "transition1.css").c_str(), |
| 101 entering_stylesheets[1].spec().c_str()); | 101 entering_stylesheets[1].spec().c_str()); |
| 102 ASSERT_STREQ((url.spec() + "transition2.css").c_str(), | 102 ASSERT_STREQ((url.spec() + "transition2.css").c_str(), |
| 103 entering_stylesheets[2].spec().c_str()); | 103 entering_stylesheets[2].spec().c_str()); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace content | 106 } // namespace content |
| OLD | NEW |