| Index: extensions/renderer/module_system_unittest.cc
|
| diff --git a/chrome/renderer/extensions/module_system_unittest.cc b/extensions/renderer/module_system_unittest.cc
|
| similarity index 97%
|
| rename from chrome/renderer/extensions/module_system_unittest.cc
|
| rename to extensions/renderer/module_system_unittest.cc
|
| index f99cb622256b6450e7dee2883764ae73b2595d7a..dafd7004acb7bedffc0b11170dae865c8b21b02c 100644
|
| --- a/chrome/renderer/extensions/module_system_unittest.cc
|
| +++ b/extensions/renderer/module_system_unittest.cc
|
| @@ -3,23 +3,21 @@
|
| // found in the LICENSE file.
|
|
|
| #include "base/memory/scoped_ptr.h"
|
| -#include "chrome/test/base/module_system_test.h"
|
| #include "extensions/renderer/module_system.h"
|
| +#include "extensions/renderer/module_system_test.h"
|
| #include "gin/modules/module_registry.h"
|
|
|
| -// TODO(cduvall/kalman): Put this file in extensions namespace.
|
| -using extensions::ModuleSystem;
|
| -using extensions::NativeHandler;
|
| -using extensions::ObjectBackedNativeHandler;
|
| +namespace extensions {
|
|
|
| class CounterNatives : public ObjectBackedNativeHandler {
|
| public:
|
| - explicit CounterNatives(extensions::ChromeV8Context* context)
|
| + explicit CounterNatives(ScriptContext* context)
|
| : ObjectBackedNativeHandler(context), counter_(0) {
|
| - RouteFunction("Get", base::Bind(&CounterNatives::Get,
|
| - base::Unretained(this)));
|
| - RouteFunction("Increment", base::Bind(&CounterNatives::Increment,
|
| - base::Unretained(this)));
|
| + RouteFunction("Get",
|
| + base::Bind(&CounterNatives::Get, base::Unretained(this)));
|
| + RouteFunction(
|
| + "Increment",
|
| + base::Bind(&CounterNatives::Increment, base::Unretained(this)));
|
| }
|
|
|
| void Get(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
| @@ -36,9 +34,7 @@ class CounterNatives : public ObjectBackedNativeHandler {
|
|
|
| class TestExceptionHandler : public ModuleSystem::ExceptionHandler {
|
| public:
|
| - TestExceptionHandler()
|
| - : handled_exception_(false) {
|
| - }
|
| + TestExceptionHandler() : handled_exception_(false) {}
|
|
|
| virtual void HandleUncaughtException(const v8::TryCatch& try_catch) OVERRIDE {
|
| handled_exception_ = true;
|
| @@ -487,3 +483,5 @@ TEST_F(ModuleSystemTest, TestRequireAsyncFromContextWithNoModuleSystem) {
|
| env()->module_system()->Require("test");
|
| RunResolvedPromises();
|
| }
|
| +
|
| +} // namespace extensions
|
|
|