| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/panels/base_panel_browser_test.h" | 5 #include "chrome/browser/ui/panels/base_panel_browser_test.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/mac/scoped_nsautorelease_pool.h" | 8 #include "base/mac/scoped_nsautorelease_pool.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 233 |
| 234 Browser* panel_browser = Browser::CreateForApp(Browser::TYPE_PANEL, | 234 Browser* panel_browser = Browser::CreateForApp(Browser::TYPE_PANEL, |
| 235 params.name, | 235 params.name, |
| 236 params.bounds, | 236 params.bounds, |
| 237 browser()->profile()); | 237 browser()->profile()); |
| 238 EXPECT_TRUE(panel_browser->is_type_panel()); | 238 EXPECT_TRUE(panel_browser->is_type_panel()); |
| 239 | 239 |
| 240 if (params.url.is_empty()) { | 240 if (params.url.is_empty()) { |
| 241 TabContentsWrapper* tab_contents = | 241 TabContentsWrapper* tab_contents = |
| 242 new TabContentsWrapper(new TestTabContents(browser()->profile(), NULL)); | 242 new TabContentsWrapper(new TestTabContents(browser()->profile(), NULL)); |
| 243 panel_browser->AddTab(tab_contents, PageTransition::LINK); | 243 panel_browser->AddTab(tab_contents, content::PAGE_TRANSITION_LINK); |
| 244 } else { | 244 } else { |
| 245 panel_browser->AddSelectedTabWithURL(params.url, | 245 panel_browser->AddSelectedTabWithURL(params.url, |
| 246 PageTransition::START_PAGE); | 246 content::PAGE_TRANSITION_START_PAGE); |
| 247 ui_test_utils::WaitForNavigation( | 247 ui_test_utils::WaitForNavigation( |
| 248 &panel_browser->GetSelectedTabContents()->controller()); | 248 &panel_browser->GetSelectedTabContents()->controller()); |
| 249 } | 249 } |
| 250 | 250 |
| 251 Panel* panel = static_cast<Panel*>(panel_browser->window()); | 251 Panel* panel = static_cast<Panel*>(panel_browser->window()); |
| 252 if (params.show_flag == SHOW_AS_ACTIVE) | 252 if (params.show_flag == SHOW_AS_ACTIVE) |
| 253 panel->Show(); | 253 panel->Show(); |
| 254 else | 254 else |
| 255 panel->ShowInactive(); | 255 panel->ShowInactive(); |
| 256 MessageLoopForUI::current()->RunAllPending(); | 256 MessageLoopForUI::current()->RunAllPending(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 std::string error; | 298 std::string error; |
| 299 scoped_refptr<Extension> extension = Extension::Create( | 299 scoped_refptr<Extension> extension = Extension::Create( |
| 300 full_path, location, *input_value, | 300 full_path, location, *input_value, |
| 301 Extension::STRICT_ERROR_CHECKS, &error); | 301 Extension::STRICT_ERROR_CHECKS, &error); |
| 302 EXPECT_TRUE(extension.get()); | 302 EXPECT_TRUE(extension.get()); |
| 303 EXPECT_STREQ("", error.c_str()); | 303 EXPECT_STREQ("", error.c_str()); |
| 304 browser()->GetProfile()->GetExtensionService()->OnLoadSingleExtension( | 304 browser()->GetProfile()->GetExtensionService()->OnLoadSingleExtension( |
| 305 extension.get(), false); | 305 extension.get(), false); |
| 306 return extension; | 306 return extension; |
| 307 } | 307 } |
| OLD | NEW |