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