OLD | NEW |
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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/json/json_reader.h" | 6 #include "base/json/json_reader.h" |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "content/common/content_constants_internal.h" | 10 #include "content/common/content_constants_internal.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
23 #include "content/public/common/url_constants.h" | 23 #include "content/public/common/url_constants.h" |
24 #include "content/public/test/browser_test_utils.h" | 24 #include "content/public/test/browser_test_utils.h" |
25 #include "content/public/test/test_utils.h" | 25 #include "content/public/test/test_utils.h" |
26 #include "content/shell/shell.h" | 26 #include "content/shell/shell.h" |
27 #include "content/test/content_browser_test.h" | 27 #include "content/test/content_browser_test.h" |
28 #include "content/test/content_browser_test_utils.h" | 28 #include "content/test/content_browser_test_utils.h" |
29 #include "net/base/net_util.h" | 29 #include "net/base/net_util.h" |
30 #include "net/test/test_server.h" | 30 #include "net/test/test_server.h" |
31 | 31 |
| 32 using content::WebContentsImpl; |
| 33 |
32 namespace { | 34 namespace { |
33 | 35 |
34 bool CompareTrees(base::DictionaryValue* first, base::DictionaryValue* second) { | 36 bool CompareTrees(base::DictionaryValue* first, base::DictionaryValue* second) { |
35 string16 name1; | 37 string16 name1; |
36 string16 name2; | 38 string16 name2; |
37 if (!first->GetString(content::kFrameTreeNodeNameKey, &name1) || | 39 if (!first->GetString(content::kFrameTreeNodeNameKey, &name1) || |
38 !second->GetString(content::kFrameTreeNodeNameKey, &name2)) | 40 !second->GetString(content::kFrameTreeNodeNameKey, &name2)) |
39 return false; | 41 return false; |
40 if (name1 != name2) | 42 if (name1 != name2) |
41 return false; | 43 return false; |
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 NavigateToURL(shell(), https_server.GetURL("files/title1.html")); | 1332 NavigateToURL(shell(), https_server.GetURL("files/title1.html")); |
1331 | 1333 |
1332 // Make sure it ends up at the right page. | 1334 // Make sure it ends up at the right page. |
1333 WaitForLoadStop(shell()->web_contents()); | 1335 WaitForLoadStop(shell()->web_contents()); |
1334 EXPECT_EQ(https_server.GetURL("files/title1.html"), | 1336 EXPECT_EQ(https_server.GetURL("files/title1.html"), |
1335 shell()->web_contents()->GetURL()); | 1337 shell()->web_contents()->GetURL()); |
1336 EXPECT_EQ(new_site_instance, shell()->web_contents()->GetSiteInstance()); | 1338 EXPECT_EQ(new_site_instance, shell()->web_contents()->GetSiteInstance()); |
1337 } | 1339 } |
1338 | 1340 |
1339 } // namespace content | 1341 } // namespace content |
OLD | NEW |