| 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 "content/shell/webkit_test_runner.h" | 5 #include "content/shell/webkit_test_runner.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <clocale> | 8 #include <clocale> |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 | 10 |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 for (size_t entry = 0; entry < num_entries; ++entry) { | 514 for (size_t entry = 0; entry < num_entries; ++entry) { |
| 515 result[entry] = | 515 result[entry] = |
| 516 webkit_glue::HistoryItemFromString(session_histories_[pos][entry]); | 516 webkit_glue::HistoryItemFromString(session_histories_[pos][entry]); |
| 517 } | 517 } |
| 518 history->swap(result); | 518 history->swap(result); |
| 519 } | 519 } |
| 520 | 520 |
| 521 WebMediaPlayer* WebKitTestRunner::createWebMediaPlayer( | 521 WebMediaPlayer* WebKitTestRunner::createWebMediaPlayer( |
| 522 WebFrame* frame, const WebURL& url, WebMediaPlayerClient* client) | 522 WebFrame* frame, const WebURL& url, WebMediaPlayerClient* client) |
| 523 { | 523 { |
| 524 if (!test_media_stream_client_.get()) { | 524 if (!test_media_stream_client_) { |
| 525 test_media_stream_client_.reset( | 525 test_media_stream_client_.reset( |
| 526 new webkit_glue::TestMediaStreamClient()); | 526 new webkit_glue::TestMediaStreamClient()); |
| 527 } | 527 } |
| 528 return webkit_glue::CreateMediaPlayer( | 528 return webkit_glue::CreateMediaPlayer( |
| 529 frame, url, client, test_media_stream_client_.get()); | 529 frame, url, client, test_media_stream_client_.get()); |
| 530 } | 530 } |
| 531 | 531 |
| 532 // RenderViewObserver -------------------------------------------------------- | 532 // RenderViewObserver -------------------------------------------------------- |
| 533 | 533 |
| 534 void WebKitTestRunner::DidClearWindowObject(WebFrame* frame) { | 534 void WebKitTestRunner::DidClearWindowObject(WebFrame* frame) { |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 ->loadRequest(WebURLRequest(GURL("about:blank"))); | 694 ->loadRequest(WebURLRequest(GURL("about:blank"))); |
| 695 Send(new ShellViewHostMsg_ResetDone(routing_id())); | 695 Send(new ShellViewHostMsg_ResetDone(routing_id())); |
| 696 } | 696 } |
| 697 | 697 |
| 698 void WebKitTestRunner::OnNotifyDone() { | 698 void WebKitTestRunner::OnNotifyDone() { |
| 699 render_view()->GetWebView()->mainFrame()->executeScript( | 699 render_view()->GetWebView()->mainFrame()->executeScript( |
| 700 WebScriptSource(WebString::fromUTF8("testRunner.notifyDone();"))); | 700 WebScriptSource(WebString::fromUTF8("testRunner.notifyDone();"))); |
| 701 } | 701 } |
| 702 | 702 |
| 703 } // namespace content | 703 } // namespace content |
| OLD | NEW |