| 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/test/nacl/nacl_browsertest_util.h" | 5 #include "chrome/test/nacl/nacl_browsertest_util.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // they make the same RPC requests, but use the automation channel instead of | 104 // they make the same RPC requests, but use the automation channel instead of |
| 105 // URL requests. This message handler decodes and responds to these requests. | 105 // URL requests. This message handler decodes and responds to these requests. |
| 106 class NaClIntegrationMessageHandler : public StructuredMessageHandler { | 106 class NaClIntegrationMessageHandler : public StructuredMessageHandler { |
| 107 public: | 107 public: |
| 108 NaClIntegrationMessageHandler(); | 108 NaClIntegrationMessageHandler(); |
| 109 | 109 |
| 110 void Log(const std::string& message); | 110 void Log(const std::string& message); |
| 111 | 111 |
| 112 virtual MessageResponse HandleStructuredMessage( | 112 virtual MessageResponse HandleStructuredMessage( |
| 113 const std::string& type, | 113 const std::string& type, |
| 114 base::DictionaryValue* msg) OVERRIDE; | 114 base::DictionaryValue* msg) override; |
| 115 | 115 |
| 116 bool test_passed() const { | 116 bool test_passed() const { |
| 117 return test_passed_; | 117 return test_passed_; |
| 118 } | 118 } |
| 119 | 119 |
| 120 private: | 120 private: |
| 121 bool test_passed_; | 121 bool test_passed_; |
| 122 | 122 |
| 123 DISALLOW_COPY_AND_ASSIGN(NaClIntegrationMessageHandler); | 123 DISALLOW_COPY_AND_ASSIGN(NaClIntegrationMessageHandler); |
| 124 }; | 124 }; |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 // to point at the isolated the test extension directory. | 341 // to point at the isolated the test extension directory. |
| 342 // Otherwise, multiple NaCl extensions tests will end up sharing the | 342 // Otherwise, multiple NaCl extensions tests will end up sharing the |
| 343 // same directory when loading the extension files. | 343 // same directory when loading the extension files. |
| 344 base::FilePath document_root; | 344 base::FilePath document_root; |
| 345 ASSERT_TRUE(GetDocumentRoot(&document_root)); | 345 ASSERT_TRUE(GetDocumentRoot(&document_root)); |
| 346 | 346 |
| 347 // Document root is relative to source root, and source root may not be CWD. | 347 // Document root is relative to source root, and source root may not be CWD. |
| 348 command_line->AppendSwitchPath(switches::kLoadExtension, | 348 command_line->AppendSwitchPath(switches::kLoadExtension, |
| 349 src_root.Append(document_root)); | 349 src_root.Append(document_root)); |
| 350 } | 350 } |
| OLD | NEW |