Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1406 m_delegate->printMessage(" - didFinishLoading\n"); | 1406 m_delegate->printMessage(" - didFinishLoading\n"); |
| 1407 } | 1407 } |
| 1408 m_resourceIdentifierMap.erase(identifier); | 1408 m_resourceIdentifierMap.erase(identifier); |
| 1409 } | 1409 } |
| 1410 | 1410 |
| 1411 void WebTestProxyBase::didAddMessageToConsole(const WebConsoleMessage& message, const WebString& sourceName, unsigned sourceLine) | 1411 void WebTestProxyBase::didAddMessageToConsole(const WebConsoleMessage& message, const WebString& sourceName, unsigned sourceLine) |
| 1412 { | 1412 { |
| 1413 // This matches win DumpRenderTree's UIDelegate.cpp. | 1413 // This matches win DumpRenderTree's UIDelegate.cpp. |
| 1414 if (!m_logConsoleOutput) | 1414 if (!m_logConsoleOutput) |
| 1415 return; | 1415 return; |
| 1416 m_delegate->printMessage(string("CONSOLE MESSAGE: ")); | 1416 string level; |
| 1417 switch (message.level) { | |
| 1418 case WebConsoleMessage::LevelDebug: | |
| 1419 level = "DEBUG"; | |
| 1420 break; | |
| 1421 case WebConsoleMessage::LevelLog: | |
| 1422 level = "LOG"; | |
|
jochen (gone - plz use gerrit)
2013/10/10 09:44:43
maybe use MESSAGE here to minimize the number of t
| |
| 1423 break; | |
| 1424 case WebConsoleMessage::LevelWarning: | |
| 1425 level = "WARNING"; | |
| 1426 break; | |
| 1427 case WebConsoleMessage::LevelError: | |
| 1428 level = "ERROR"; | |
| 1429 break; | |
| 1430 } | |
| 1431 m_delegate->printMessage(string("CONSOLE ") + level + ": "); | |
| 1417 if (sourceLine) { | 1432 if (sourceLine) { |
| 1418 char buffer[40]; | 1433 char buffer[40]; |
| 1419 snprintf(buffer, sizeof(buffer), "line %d: ", sourceLine); | 1434 snprintf(buffer, sizeof(buffer), "line %d: ", sourceLine); |
| 1420 m_delegate->printMessage(buffer); | 1435 m_delegate->printMessage(buffer); |
| 1421 } | 1436 } |
| 1422 if (!message.text.isEmpty()) { | 1437 if (!message.text.isEmpty()) { |
| 1423 string newMessage; | 1438 string newMessage; |
| 1424 newMessage = message.text.utf8(); | 1439 newMessage = message.text.utf8(); |
| 1425 size_t fileProtocol = newMessage.find("file://"); | 1440 size_t fileProtocol = newMessage.find("file://"); |
| 1426 if (fileProtocol != string::npos) { | 1441 if (fileProtocol != string::npos) { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1491 | 1506 |
| 1492 void WebTestProxyBase::resetInputMethod() | 1507 void WebTestProxyBase::resetInputMethod() |
| 1493 { | 1508 { |
| 1494 // If a composition text exists, then we need to let the browser process | 1509 // If a composition text exists, then we need to let the browser process |
| 1495 // to cancel the input method's ongoing composition session. | 1510 // to cancel the input method's ongoing composition session. |
| 1496 if (m_webWidget) | 1511 if (m_webWidget) |
| 1497 m_webWidget->confirmComposition(); | 1512 m_webWidget->confirmComposition(); |
| 1498 } | 1513 } |
| 1499 | 1514 |
| 1500 } | 1515 } |
| OLD | NEW |