Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: mojo/services/view_manager/view_manager_connection_unittest.cc

Issue 260863008: Add support for mapping node tree on the client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/services/view_manager/ids.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/view_manager_connection_unittest.cc
diff --git a/mojo/services/view_manager/view_manager_connection_unittest.cc b/mojo/services/view_manager/view_manager_connection_unittest.cc
index a6cb15327d851a95aee5f9da2c7c387b28b7a38a..dea435b03ba1720c8dbc0004307abe86ed514e9c 100644
--- a/mojo/services/view_manager/view_manager_connection_unittest.cc
+++ b/mojo/services/view_manager/view_manager_connection_unittest.cc
@@ -12,6 +12,7 @@
#include "base/strings/stringprintf.h"
#include "mojo/public/cpp/bindings/allocation_scope.h"
#include "mojo/public/cpp/environment/environment.h"
+#include "mojo/services/public/cpp/view_manager/util.h"
#include "mojo/services/public/cpp/view_manager/view_manager_types.h"
#include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
#include "mojo/shell/shell_test_helper.h"
@@ -25,14 +26,6 @@ namespace {
base::RunLoop* current_run_loop = NULL;
-uint16_t FirstIdFromTransportId(uint32_t id) {
- return static_cast<uint16_t>((id >> 16) & 0xFFFF);
-}
-
-uint16_t SecondIdFromTransportId(uint32_t id) {
- return static_cast<uint16_t>(id & 0xFFFF);
-}
-
// Sets |current_run_loop| and runs it. It is expected that someone else quits
// the loop.
void DoRunLoop() {
@@ -45,8 +38,7 @@ void DoRunLoop() {
// Converts |id| into a string.
std::string NodeIdToString(TransportNodeId id) {
return (id == 0) ? "null" :
- base::StringPrintf("%d,%d", FirstIdFromTransportId(id),
- SecondIdFromTransportId(id));
+ base::StringPrintf("%d,%d", HiWord(id), LoWord(id));
}
// Boolean callback. Sets |result_cache| to the value of |result| and quits
« no previous file with comments | « mojo/services/view_manager/ids.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698