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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // nacl_integration tests report to their test jig using a series of RPC calls | 102 // nacl_integration tests report to their test jig using a series of RPC calls |
103 // that are encoded as URL requests. When these tests run as browser_tests, | 103 // that are encoded as URL requests. When these tests run as browser_tests, |
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 MessageResponse HandleStructuredMessage(const std::string& type, |
113 const std::string& type, | 113 base::DictionaryValue* msg) override; |
114 base::DictionaryValue* msg) override; | |
115 | 114 |
116 bool test_passed() const { | 115 bool test_passed() const { |
117 return test_passed_; | 116 return test_passed_; |
118 } | 117 } |
119 | 118 |
120 private: | 119 private: |
121 bool test_passed_; | 120 bool test_passed_; |
122 | 121 |
123 DISALLOW_COPY_AND_ASSIGN(NaClIntegrationMessageHandler); | 122 DISALLOW_COPY_AND_ASSIGN(NaClIntegrationMessageHandler); |
124 }; | 123 }; |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 // to point at the isolated the test extension directory. | 340 // to point at the isolated the test extension directory. |
342 // Otherwise, multiple NaCl extensions tests will end up sharing the | 341 // Otherwise, multiple NaCl extensions tests will end up sharing the |
343 // same directory when loading the extension files. | 342 // same directory when loading the extension files. |
344 base::FilePath document_root; | 343 base::FilePath document_root; |
345 ASSERT_TRUE(GetDocumentRoot(&document_root)); | 344 ASSERT_TRUE(GetDocumentRoot(&document_root)); |
346 | 345 |
347 // Document root is relative to source root, and source root may not be CWD. | 346 // Document root is relative to source root, and source root may not be CWD. |
348 command_line->AppendSwitchPath(switches::kLoadExtension, | 347 command_line->AppendSwitchPath(switches::kLoadExtension, |
349 src_root.Append(document_root)); | 348 src_root.Append(document_root)); |
350 } | 349 } |
OLD | NEW |