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

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

Issue 274071: When Chrome hands off a URL to be opened by the external host by the ViewHost... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gfx/rect.h" 6 #include "base/gfx/rect.h"
7 #include "base/json_reader.h" 7 #include "base/json_reader.h"
8 #include "base/json_writer.h" 8 #include "base/json_writer.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/automation/extension_automation_constants.h" 10 #include "chrome/browser/automation/extension_automation_constants.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 EXPECT_TRUE(tab->is_valid()); 64 EXPECT_TRUE(tab->is_valid());
65 if (tab) { 65 if (tab) {
66 // Enter a message loop to allow the tab to be created 66 // Enter a message loop to allow the tab to be created
67 proxy->WaitForNavigation(2000); 67 proxy->WaitForNavigation(2000);
68 DoAdditionalPreNavigateSetup(tab.get()); 68 DoAdditionalPreNavigateSetup(tab.get());
69 69
70 // We explicitly do not make this a toolstrip in the extension manifest, 70 // We explicitly do not make this a toolstrip in the extension manifest,
71 // so that the test can control when it gets loaded, and so that we test 71 // so that the test can control when it gets loaded, and so that we test
72 // the intended behavior that tabs should be able to show extension pages 72 // the intended behavior that tabs should be able to show extension pages
73 // (useful for development etc.) 73 // (useful for development etc.)
74 tab->NavigateInExternalTab(url); 74 tab->NavigateInExternalTab(url, GURL());
75 EXPECT_TRUE(proxy->WaitForMessage(action_max_timeout_ms())); 75 EXPECT_TRUE(proxy->WaitForMessage(action_max_timeout_ms()));
76 76
77 proxy->DestroyHostWindow(); 77 proxy->DestroyHostWindow();
78 proxy->WaitForTabCleanup(tab, action_max_timeout_ms()); 78 proxy->WaitForTabCleanup(tab, action_max_timeout_ms());
79 EXPECT_FALSE(tab->is_valid()); 79 EXPECT_FALSE(tab->is_valid());
80 } 80 }
81 } 81 }
82 82
83 // Override if you need additional stuff before we navigate the page. 83 // Override if you need additional stuff before we navigate the page.
84 virtual void DoAdditionalPreNavigateSetup(TabProxy* tab) { 84 virtual void DoAdditionalPreNavigateSetup(TabProxy* tab) {
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 proxy->event_count_.size()); 488 proxy->event_count_.size());
489 for (std::map<std::string, int>::iterator i = proxy->event_count_.begin(); 489 for (std::map<std::string, int>::iterator i = proxy->event_count_.begin();
490 i != proxy->event_count_.end(); ++i) { 490 i != proxy->event_count_.end(); ++i) {
491 const std::pair<std::string, int>& value = *i; 491 const std::pair<std::string, int>& value = *i;
492 ASSERT_EQ(1, value.second); 492 ASSERT_EQ(1, value.second);
493 } 493 }
494 } 494 }
495 #endif // defined(OS_WIN) 495 #endif // defined(OS_WIN)
496 496
497 } // namespace 497 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/external_tab_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698