• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2020 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 package org.chromium.url;
6 
7 import org.jni_zero.CalledByNative;
8 import org.jni_zero.JNINamespace;
9 import org.jni_zero.NativeMethods;
10 
11 /** Helpers for GURLJavaTest that need to call into native code. */
12 @JNINamespace("url")
13 public class GURLJavaTestHelper {
14     @CalledByNative
createGURL(String uri)15     public static GURL createGURL(String uri) {
16         return new GURL(uri);
17     }
18 
nativeInitializeICU()19     public static void nativeInitializeICU() {
20         GURLJavaTestHelperJni.get().initializeICU();
21     }
22 
nativeTestGURLEquivalence()23     public static void nativeTestGURLEquivalence() {
24         GURLJavaTestHelperJni.get().testGURLEquivalence();
25     }
26 
27     @NativeMethods
28     interface Natives {
initializeICU()29         void initializeICU();
30 
testGURLEquivalence()31         void testGURLEquivalence();
32     }
33 }
34