OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/memory/weak_ptr.h" | 5 #include "base/memory/weak_ptr.h" |
6 #include "base/strings/string_number_conversions.h" | 6 #include "base/strings/string_number_conversions.h" |
7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/threading/non_thread_safe.h" | 9 #include "base/threading/non_thread_safe.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 " \"Browser\": \"Version/4.0\",\n" | 93 " \"Browser\": \"Version/4.0\",\n" |
94 " \"Protocol-Version\": \"1.0\",\n" | 94 " \"Protocol-Version\": \"1.0\",\n" |
95 " \"User-Agent\": \"Mozilla/5.0 (Linux; Android 4.3; Build/KRS74B) " | 95 " \"User-Agent\": \"Mozilla/5.0 (Linux; Android 4.3; Build/KRS74B) " |
96 "AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Safari/537.36\",\n" | 96 "AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Safari/537.36\",\n" |
97 " \"WebKit-Version\": \"537.36 (@157588)\"\n" | 97 " \"WebKit-Version\": \"537.36 (@157588)\"\n" |
98 "}"; | 98 "}"; |
99 | 99 |
100 char kSampleChromePages[] = "[ {\n" | 100 char kSampleChromePages[] = "[ {\n" |
101 " \"description\": \"\",\n" | 101 " \"description\": \"\",\n" |
102 " \"devtoolsFrontendUrl\": \"/devtools/devtools.html?" | 102 " \"devtoolsFrontendUrl\": \"/devtools/devtools.html?" |
103 "ws=/devtools/page/0\",\n" | 103 "ws=/devtools/page/755DE5C9-D49F-811D-0693-51B8E15C80D2\",\n" |
104 " \"id\": \"0\",\n" | 104 " \"id\": \"755DE5C9-D49F-811D-0693-51B8E15C80D2\",\n" |
105 " \"title\": \"The Chromium Projects\",\n" | 105 " \"title\": \"The Chromium Projects\",\n" |
106 " \"type\": \"page\",\n" | 106 " \"type\": \"page\",\n" |
107 " \"url\": \"http://www.chromium.org/\",\n" | 107 " \"url\": \"http://www.chromium.org/\",\n" |
108 " \"webSocketDebuggerUrl\": \"" | 108 " \"webSocketDebuggerUrl\": \"" |
109 "ws:///devtools/page/0\"\n" | 109 "ws:///devtools/page/755DE5C9-D49F-811D-0693-51B8E15C80D2\"\n" |
110 "} ]"; | 110 "} ]"; |
111 | 111 |
112 char kSampleChromeBetaPages[] = "[ {\n" | 112 char kSampleChromeBetaPages[] = "[]"; |
113 " \"description\": \"\",\n" | |
114 " \"devtoolsFrontendUrl\": \"/devtools/devtools.html?" | |
115 "ws=/devtools/page/0\",\n" | |
116 " \"id\": \"0\",\n" | |
117 " \"title\": \"The Chromium Projects\",\n" | |
118 " \"type\": \"page\",\n" | |
119 " \"url\": \"http://www.chromium.org/\",\n" | |
120 " \"webSocketDebuggerUrl\": \"" | |
121 "ws:///devtools/page/0\"\n" | |
122 "} ]"; | |
123 | 113 |
124 char kSampleWebViewPages[] = "[ {\n" | 114 char kSampleWebViewPages[] = "[ {\n" |
125 " \"description\": \"{\\\"attached\\\":false,\\\"empty\\\":false," | 115 " \"description\": \"{\\\"attached\\\":false,\\\"empty\\\":false," |
126 "\\\"height\\\":1173,\\\"screenX\\\":0,\\\"screenY\\\":0," | 116 "\\\"height\\\":1173,\\\"screenX\\\":0,\\\"screenY\\\":0," |
127 "\\\"visible\\\":true,\\\"width\\\":800}\",\n" | 117 "\\\"visible\\\":true,\\\"width\\\":800}\",\n" |
128 " \"devtoolsFrontendUrl\": \"http://chrome-devtools-frontend.appspot.com/" | 118 " \"devtoolsFrontendUrl\": \"http://chrome-devtools-frontend.appspot.com/" |
129 "serve_rev/@157588/devtools.html?ws=" | 119 "serve_rev/@157588/devtools.html?ws=" |
130 "/devtools/page/3E962D4D-B676-182D-3BE8-FAE7CE224DE7\",\n" | 120 "/devtools/page/3E962D4D-B676-182D-3BE8-FAE7CE224DE7\",\n" |
131 " \"faviconUrl\": \"http://chromium.org/favicon.ico\",\n" | 121 " \"faviconUrl\": \"http://chromium.org/favicon.ico\",\n" |
132 " \"id\": \"3E962D4D-B676-182D-3BE8-FAE7CE224DE7\",\n" | 122 " \"id\": \"3E962D4D-B676-182D-3BE8-FAE7CE224DE7\",\n" |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 | 530 |
541 void StopMockAdbServer() { | 531 void StopMockAdbServer() { |
542 BrowserThread::PostTaskAndReply( | 532 BrowserThread::PostTaskAndReply( |
543 BrowserThread::IO, | 533 BrowserThread::IO, |
544 FROM_HERE, | 534 FROM_HERE, |
545 base::Bind(&StopMockAdbServerOnIOThread), | 535 base::Bind(&StopMockAdbServerOnIOThread), |
546 base::MessageLoop::QuitClosure()); | 536 base::MessageLoop::QuitClosure()); |
547 content::RunMessageLoop(); | 537 content::RunMessageLoop(); |
548 } | 538 } |
549 | 539 |
OLD | NEW |