| 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 "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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 scoped_ptr<DictionaryValue> input_value(extra_value.DeepCopy()); | 421 scoped_ptr<DictionaryValue> input_value(extra_value.DeepCopy()); |
| 422 input_value->SetString(extension_manifest_keys::kVersion, "1.0.0.0"); | 422 input_value->SetString(extension_manifest_keys::kVersion, "1.0.0.0"); |
| 423 input_value->SetString(extension_manifest_keys::kName, "Sample Extension"); | 423 input_value->SetString(extension_manifest_keys::kName, "Sample Extension"); |
| 424 | 424 |
| 425 std::string error; | 425 std::string error; |
| 426 scoped_refptr<Extension> extension = Extension::Create( | 426 scoped_refptr<Extension> extension = Extension::Create( |
| 427 full_path, location, *input_value, Extension::NO_FLAGS, &error); | 427 full_path, location, *input_value, Extension::NO_FLAGS, &error); |
| 428 EXPECT_TRUE(extension.get()); | 428 EXPECT_TRUE(extension.get()); |
| 429 EXPECT_STREQ("", error.c_str()); | 429 EXPECT_STREQ("", error.c_str()); |
| 430 browser()->profile()->GetExtensionService()-> | 430 browser()->profile()->GetExtensionService()-> |
| 431 OnExtensionInstalled(extension.get(), false, StringOrdinal()); | 431 OnExtensionInstalled(extension.get(), false /* not from webstore */, |
| 432 StringOrdinal(), false /* no requirement errors */); |
| 432 return extension; | 433 return extension; |
| 433 } | 434 } |
| 434 | 435 |
| 435 void BasePanelBrowserTest::SetTestingAreas(const gfx::Rect& primary_screen_area, | 436 void BasePanelBrowserTest::SetTestingAreas(const gfx::Rect& primary_screen_area, |
| 436 const gfx::Rect& work_area) { | 437 const gfx::Rect& work_area) { |
| 437 DCHECK(primary_screen_area.Contains(work_area)); | 438 DCHECK(primary_screen_area.Contains(work_area)); |
| 438 mock_display_settings_provider_->SetPrimaryScreenArea(primary_screen_area); | 439 mock_display_settings_provider_->SetPrimaryScreenArea(primary_screen_area); |
| 439 mock_display_settings_provider_->SetWorkArea( | 440 mock_display_settings_provider_->SetWorkArea( |
| 440 work_area.IsEmpty() ? primary_screen_area : work_area); | 441 work_area.IsEmpty() ? primary_screen_area : work_area); |
| 441 } | 442 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 } | 477 } |
| 477 | 478 |
| 478 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { | 479 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { |
| 479 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); | 480 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); |
| 480 } | 481 } |
| 481 | 482 |
| 482 std::string BasePanelBrowserTest::MakePanelName(int index) { | 483 std::string BasePanelBrowserTest::MakePanelName(int index) { |
| 483 std::string panel_name("Panel"); | 484 std::string panel_name("Panel"); |
| 484 return panel_name + base::IntToString(index); | 485 return panel_name + base::IntToString(index); |
| 485 } | 486 } |
| OLD | NEW |